//http://code.google.com/codejam/contest/2334486/dashboard#s=p2
//AC
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>

#define FILEIO

#define ARRAYSIZE 2000
int Hedgemony_main(int argc,char **argv) 
{ 

#ifdef FILEIO
	freopen("Hedgemony_in.txt","r",stdin); 
	freopen("Hedgemony_out.txt","w",stdout); 
#endif

	int T;
	int N;

	int i,j;
	int temp;
	float tresult;

	float array[ARRAYSIZE];

	scanf("%d",&T);

	for(i=1;i<=T;i++)
	{
		scanf("%d",&N);
		memset(array,0,ARRAYSIZE*sizeof(float));
		// case start
		for(j=0;j<N;j++)
		{
			scanf("%d",&temp);
			array[j]=temp;
		}
		for(j=1;j<N-1;j++)
		{
			tresult = (float)(array[j-1]+array[j+1])/(float)2;
			if(tresult<array[j])
				array[j]=tresult;
		}
		printf("Case #%d: %.6f\n",i,array[N-2]);
	}


#ifdef FILEIO
	fclose(stdin);
	fclose(stdout);
#endif

	return 0; 
} 
